package bus;

import java.util.List;

import dao.AccountDAO;
import dto.AccountDTO;

public class AccountBUS {
	public AccountDTO info = new AccountDTO();
	public AccountDAO data = new AccountDAO(null);
	
	public void setInfo(AccountDTO account) {
		this.info = account;
	}
	
	public AccountDTO getInfo() {
		return this.info;
	}
	
	public int addAccount() {
		return data.addAccount(info);
	}
	
	public List<AccountDTO> getAllAccounts(){
		return data.getAllAccounts();
	}
	
	public boolean updateAccount(){
		return data.updateAccount(info);
	}
	
	public void deleteAccount(){
		data.deleteAccount(info);
	}
	
	public void deleteAllAccounts(){
		data.deleteAllAccounts();
	}
	
	public int getAccountCount(){
		return data.getAccountCount();
	}
}
